/**
 * *****************************************************************
 * @file    adt3102_watchdog.h
 * @author  WuHao(hwu@andartechs.com.cn)
 * @version 1.0.0
 * @date    2020-11-09
 * @brief   
 * @update  2022-02-23, v1.0.1, add target keeping and tracking, cxy
 *                 Copyright (c) 2020, Andar Technologies Inc.
 *                           www.andartechs.com 
 *
 * *****************************************************************
 */
#ifndef __WATCHDOG__H
#define __WATCHDOG__H
/*------------------------------ include -------------------------------------*/
#include "adt3102_type_define.h"


/*----------------------------- define ---------------------------------------*/
#define WATCHDOG_UNLOCK (uint32)0x1ACCE551
#define WATCHDOG_LOCK   (uint32)0xFFFFFFFF


/*----------------------------- function -------------------------------------*/
/**
 * @brief   watchdog config.
 * @param   reload: clock beats, 50000000 = 1s.
 * @return  None.
 * @note
 */
void watchdogInit(uint32 reload);

/**
 * @brief   watchdog feed.
 * @param   reload: clock beats, 50000000 = 1s.
 * @return  None.
 * @note
 */
void watchdogFeed(uint32 reload);

/**
 * @brief   watchdog lock.
 * @param   isLock: WATCHDOG_UNLOCK: Enable watchdog, unlcok.
 *                  WATCHDOG_LOCK: Disable watchdog, lock.
 * @return  None.
 * @note
 */
void watchdogLock(uint32 isLock);

/**
 * @brief   watchdog close.
 * @param   reload: clock beats, 50000000 = 1s.
 * @return  None.
 * @note
 */
void watchdogClose(void);

 /**
 * @brief   init the watch dog.
 * @param   None.
 * @return  None.
 * @note
 */
void initWatchDog(uint32 second);

 /**
 * @brief   feed the watch dog.
 * @param   None.
 * @return  None.
 * @note
 */
void feedWatchDog(uint32 second);

#endif
